1. Field of the Invention
The present invention relates to an interpolation processing apparatus that engages in interpolation processing on color image data to supplement a color component and a luminance component missing in pixels and a recording medium having an interpolation processing program for achieving the interpolation processing on a computer, that can be read by a computer.
2. Description of the Related Art
Some electronic cameras generate color image data by employing an image-capturing sensor having three color (R, G and B: red, green and blue) color filters provided at specific positions (e.g., a Bayer array). In such an electronic camera in which the individual pixels at the image-capturing sensor each output color information corresponding to only a single color component, it is necessary to implement interpolation processing to obtain color information corresponding to all the color components for each pixel.
In an interpolation processing method proposed in the prior art, spatial similarity manifested by an interpolation target pixel undergoing the interpolation processing is judged and an interpolation value is calculated by using the color information output from pixels positioned along the direction in which a high degree of similarity is manifested.
For instance, in the art disclosed in U.S. Pat. No. 5,629,734, a green color interpolation value G5 for the interpolation target pixel is calculated through one formula among formula 1 through formula 3 when the color information corresponding to individual pixels is provided as shown below, with A5 representing the color information at the interpolation target pixel (a pixel with the green color component missing), A1, A3, A7 and A9 representing color information from pixels provided with color filters in the same color as the color of the filter at the interpolation target pixel and G2, G4, G6 and G8 representing color information from pixels provided with green color filters.
A1G2A3 G4 A5 G6 A7G8A9
If a marked similarity manifests along the horizontal direction, the green color interpolation value G5 for the interpolation target pixel is calculated through;G5=(G4+G6)/2+(−A3+2A5−A7)/4  (formula 1).If a marked similarity manifests along the vertical direction, the green color interpolation value G5 for the interpolation target pixel is calculated through;G5=(G2+G8)/2+(−A1+2A5−A9)/4  (formula 2).If roughly equal degrees of similarity manifest along the horizontal direction and the vertical direction, the green color interpolation value G5 for the interpolation target pixel is calculated throughG5=(G2+G4+G6+G8)/4+(−A1−A3+4A5−A7−A9)/8  (formula 3).It is to be noted that in order to simplify the subsequent explanation, the first terms ((G4+G6)/2, (G2+G8)/2) in formulae 1 and 2 are each referred to as a primary term and that second terms ((−A3+2A5−A7)/4, (−A1+2A5−A9)/4) in formulae 1 and 2 are each referred to as a correctional term.
In U.S. Pat. No. 5,629,734, assuming that the image data undergoing the interpolation processing manifest marked similarity along the horizontal direction with A3, G4, A5, G6 and A7 provided as indicated with  marks in FIG. 17, A4 representing the average of A3 and A5, and A6 representing the average of A5 and A7, the value of the correctional term in formula 1 is equivalent to the vector quantity (α in FIG. 17) representing the difference between A5 and the average of A4 and A6. In addition, the green color interpolation value G5 is equivalent to a value achieved by correcting the average of the values indicated by the color information from pixels adjacent along the horizontal direction (corresponds to the value of the primary term in formula 1) by α.
In other words, in the art disclosed in U.S. Pat. No. 5,629,734, a green color interpolation value is calculated by assuming that the color difference between the green color component and the color component (the red color component or the blue color component) at the interpolation target pixel is constant ((A4−G4), (A5−G5) and (A6−G6) in FIG. 17 match) and correcting the average of the values indicated by the color information from the pixels that are adjacent along the direction in which a high degree of similarity is manifested with color information corresponding to the same color component as that of the interpolation target pixel.
Optical systems such as lenses are known to manifest magnification chromatic aberration. For instance, if there is magnification chromatic aberration at the photographic lens of an electronic camera having an image-capturing sensor provided with color filters in three colors, i.e., R, G and B, arranged in a Bayer array, images corresponding to the red color component and the blue color component are formed at positions slightly offset from the position at which the image corresponding to the green color component is formed, as shown in FIGS. 18B and 18C.
If the photographic lens is free of any magnification chromatic aberration and color information corresponding to the individual pixels is provided as indicated by the  marks in FIG. 19A (the image data undergoing the interpolation processing manifest marked similarity along the horizontal direction, the color information corresponding to the green color component indicates a constant value and the values indicated by the color information corresponding to the red color component and the color information corresponding to the blue color component both change gently in the vicinity of the interpolation target pixel (the pixel at which A5 is present), the value of the correctional term in formula 1 is 0 and, as a result, the average of G4 and G6 (the primary term) is directly used as the green color interpolation value G5 without correction.
However, when A3, A5 and A7 each represent color information corresponding to the red color component and each set of color information corresponding to the red color component is offset by one pixel to the right due to a magnification chromatic aberration at the photographic lens, the color information from the individual pixels undergoes a change as shown in FIG. 19B. Consequently, the value of the correctional term in formula 1 is not 0 and the primary term is over-corrected (hereafter referred to as an “over-correction”) in such a case, resulting in the green color interpolation value G5 that should be similar to the values indicated by G4 and G6 becoming larger than the G4 and G6 values (hereafter this phenomenon is referred to as an “overshoot”). If, on the other hand, A3, A5 and A7 each represent color information corresponding to the blue color component and each set of color information corresponding to the blue color component is offset by one pixel to the left due to a magnification chromatic aberration, the color information from the individual pixels undergoes a change as shown in FIG. 19C. Thus, the value of the correctional term in formula 1 is not 0, resulting in the green color interpolation value G5 that should be similar to the G4 and G6 values becoming smaller than those corresponding to G4 and G6 (hereafter this phenomenon is referred to as an “undershoot”) through an over-correction.
In other words, the art disclosed in U.S. Pat. No. 5,629,734 poses a problem in that color artifacts occur in the color image obtained through the interpolation processing due to a magnification chromatic aberration.
An over correction also occurs at a color boundary where the color difference changes as well as when there is a magnification chromatic aberration. For instance, the color information corresponding to the individual pixels is provided as indicated by the  marks in FIGS. 20A and 20B (when the color information corresponding to the green color component is constant and the values identified by the color information corresponding to the red color component or the blue color component change drastically near the interpolation target pixel (the pixel at which A5 is present)), the value of the correctional term in formula 1 is not 0 and, an overshoot or an undershoot occurs due to an over correction with regard to the green color interpolation value G5, which should be similar to the values indicated by G4 and G6.
Thus, in a color boundary where the color difference changes, a color artifact occurs as a result of interpolation processing even if there is no magnification chromatic aberration. It is to be noted that such a color artifact as that described above may occur when calculating a red color interpolation value or a blue color interpolation value as well as when calculating a green color interpolation value.